<?php 
require_once Path::interfaces('manager');
require_once Path::models('dummy');
require_once Path::models('dummyUser');

class DummyManager extends DummyModel implements ManagerInterface
{
	public function saveManager($instance)
	{
		return $this->getDBConnection()->save($instance);
	}

	public function deleteManager($instance)
	{
		return $this->getDBConnection()->delete($instance);
	}

	public function findManager($instance)
	{
		return $this->getDBConnection()->find($instance);
	}
	
	public function findAllManager($instance)
	{
		return $this->getDBConnection()->findAll($instance);
	}
	
	public function findNativeManager()
	{
		return $this->getDBConnection()->findNative(
				"Dummy",
				$this->XMLSQL($this->database['modelName'], "dummy")
		);
	}
	
	public function findAllNativeManager()
	{
		return $this->getDBConnection()->findAllNative(
				"Dummy,DummyUser",
				$this->XMLSQL($this->database['modelName'], "dummyJoinDummyUser")
		);
	}
	
	public function findCountNativeManager()
	{
		return $this->getDBConnection()->findNative(
				"Custom[count]",
				$this->XMLSQL($this->database['modelName'], "findCountNative",":dummyId=1")
		);
	}

}
